package com.example.demo.Controller;

import com.example.demo.Dao.UserMaper;
import com.example.demo.Model.UserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SelectUserController {
    @Autowired
    private UserMaper userMaper;

    @RequestMapping(value = "/find",method = RequestMethod.GET)
    public UserEntity finduser(@RequestParam(value = "accont",defaultValue = "xiaoli") String accont){
        return userMaper.findbyAccount(accont);
    }
}
